package com.yun.zf.common.esIndex;

import lombok.Data;
import org.springframework.data.annotation.Transient;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.List;
import java.util.Map;

@Data
public class CustomerRequirementTemplate {

    @Field(type = FieldType.Long)
    private Long id;
    /**
     * 需求类型，1整租2合租3租商铺4租写字楼5买二手房6买新房7买商铺8买写字楼
     */
    @Field(type = FieldType.Integer)
    private Integer demandType;

    /**
     * 面积
     */

    @Transient
    private String area;
    @Field(type = FieldType.Integer_Range)
    private Map<String, Integer> areaRange;

    /**
     * 预算
     */
    @Transient
    private String budget;
    @Field(type = FieldType.Integer_Range)
    private Map<String, Integer> budgetRange;

    private String unit;

    /**
     * 房源装修情况,mp 毛坯，jian 简装，jing 精装，hz 豪华装修
     */
    @Field(type = FieldType.Keyword)
    private String fixtures;

    /**
     * 意向居室
     */
    @Transient
    private String  bedrooms;
    @Field(type = FieldType.Integer_Range)
    private Map<String, Integer> bedroomsRange;
    /**
     * 意向楼层
     */
    @Transient
    private String floor;

    @Field(type = FieldType.Integer_Range)
    private Map<String, Integer> floorRange;
    /**
     * 楼龄，填写范围
     */

    @Transient
    private String buidYear;
    @Field(type = FieldType.Integer_Range)
    private Map<String, Integer> buidYearRange;
    /**
     * 如果出租必选出租方式1整租，2合租
     */
    @Field(type = FieldType.Integer)
    private Integer rentType;

    // 商圈
    @Field(type = FieldType.Keyword)
    private String business;
    //区域
    @Field(type = FieldType.Keyword)
    private String region;
    // 学校
    @Field(type = FieldType.Keyword)
    private String school;
    // 医院
    @Field(type = FieldType.Keyword)
    private String hospital;
    @Field(type = FieldType.Nested)
    private List<BusMo> busMos;
    @Field(type = FieldType.Nested)
    private List<SubwayMo> subwayMos;

}
